<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>rem布局开发</title>
    <style>
        html{
            font-size: 16 px;
        }
        .box1,.box2,.box3{
            border: 1px solid red;
            font-size: 16px;
        }

        .box1 p{
            font-size: 32px;
        }
        .box2 p{
            font-size: 2em;
        }
        .box3 p{
            font-size: 2rem;
        }
        .box3 p span{
            /* font-size: 3rem; */
            font-size: 4rem;
        }
    </style>
</head>
<body>
    <!-- 
        px , em , rem 之争
        px:50px
        em:相对单位，相对于父元素的字体大小。（若父元素字体大小为 100px ，那么 1em == 100px）
        rem：相对单位，相对于根元素（html）字体大小，div width：10rem;
     -->

     <div class="box1">
        <p>能能酱酱</p>
     </div>
     <div class="box2">
        <p>笑笑酱酱</p>
     </div>
     <div class="box3">
        <p>瑶瑶<span>酱酱</span></p>
     </div>
</body>
</html>